from time import sleep

from class_20200802.testDemo.LoginFunction import login,logout
from class_20200802.testDemo.login_data import suceessed_data as SD
import unittest

import xlrd
import xlwt
import configparser

#
# wb = xlrd.open_workbook('data.xlsx')
#
# # 获取sheet名字
# print(wb.sheet_names())
#
# print(wb.sheet_by_name('user').cell(2, 1).value)

cf = configparser.ConfigParser()
cf.read('datas.ini', encoding='utf-8')

print(cf.get('info', 'username'))
print(cf.get('info', 'password'))



# 登录成功
# 0login(SD[0]['username'], SD[0]['password'])
#
# # 退出
# logout()
# filed = open('data.txt','r',encoding='utf-8')
# with open('data.txt','r',encoding='utf-8') as fd:
#     for line in fd.readlines():
#         username = line.strip().split(',')[0]
#         password = line.strip().split(',')[1]
#         print(username, password)
#         0login(username, password)
#         sleep(2)
#         logout()




